<?php
Yii::app()->clientScript->registerCoreScript('jquery.ui');
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/app/payment.js', CClientScript::POS_END);
//Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl.'/js/app/json2.js',  CClientScript::POS_HEAD);
?>
<style>
    .invoice-row {
        background-color:#99FF66;
    }   
    .sales-order-row{
        background-color:#FFFFCC;
    }
</style>
<div id="left-col">
    <div class="inside">


        <?php $this->renderPartial('_side'); ?>
    </div>
</div>
<div id="right-col">

    <div class="wrap">
        <div class="container">
            <div class="inside">

                <h1>
                    Payment
                </h1>
                <div class="form">

                    <?php
                    $form = $this->beginWidget('CActiveForm', array(
                        'id' => 'payment-form',
                        'enableAjaxValidation' => false,
                            ));
                    ?>
                 
                    <div class="left-column">
                        
                        <div class="row short" >
                            <label>Customer</label>
                            <?php 
                                echo CHtml::textField('cust-name');
                                echo CHtml::hiddenField('custno');
                            ?>                                                       
                        </div>
                        <div class="row short">
                           
                            <label>Memo</label>
                            <?php echo CHtml::textField('memo'); ?>
                          
                        </div>
                       

                        <div class="row short">
                            <label>Date</label>
                            <?php
                            $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                                'name' => 'entrydate',
                                'value' => date('Y-m-d'),
                                'options' => array('dateFormat' => 'yy-mm-dd'),
                            ));
                            ?>

                            

                        </div>


                        <div class="row short">
                            <label>Check</label>
                            <?php echo CHtml::textField('ckno', '', array('size' => 12, 'maxlength' => 12)); ?>
                            
                        </div>


                        <div class="row short">
                            <label>Account Balance</label>
                            <?php echo CHtml::textField('balance'); ?>
                            
                        </div>
                    
                        
                    </div>
                    <div class="right-column">
                  
                        <div class="row short">
                            <label>Payment Method</label>
                            <?php echo CHtml::dropDownList('paymethod', '', PaymentMethods::getList()); ?>
                        </div>
                        <div class="row short">
                            <label>Payment Amount</label>
                            <?php echo CHtml::textField('paymentamount', '', array('size' => 10, 'maxlength' => 10)); ?>
                        </div>
                        <div class="row short">
                            <label>Applied Amount</label>
                            <?php echo CHtml::textField('amount', '', array('size' => 10, 'maxlength' => 10)); ?>           
                        </div>
                        <div class="row short">

                            <label>Remaining Payment</label>
                            <?php echo CHtml::textField('remainpayment'); ?>
                        </div>
                    </div>
                    <div class="clear"></div>


                    <?php $this->endWidget(); ?>


                </div><!-- form -->
                <br/>
                <div id="prepayment-list">

                </div>
            </div>
        </div>
    </div>
</div>